set(FATFS_SRC_DIR ${PROJECT_ROOT}/lib/fatfs)
set(FATFS_INC_DIR ${PROJECT_ROOT}/lib/fatfs)

qelib_include_directories(${FATFS_INC_DIR})

qelib_sources(
    ${FATFS_SRC_DIR}/ff.c
    ${FATFS_SRC_DIR}/ffsystem.c
    ${FATFS_SRC_DIR}/ffunicode.c
    ${FATFS_SRC_DIR}/diskio.c
)

qelib_install_headers_ifdef(
    CONFIG_FATFS
    ${FATFS_INC_DIR}/ff.h
    ${FATFS_INC_DIR}/diskio.h
)